-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix listbox closing immediately after opening on touch devices #3755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
JSDOM Doesn't support PointerEvent yet, so let's add this to the polyfills.
Rely on: - `PointerDown` in case `pointerType === 'mouse'` - `Click` in case `pointerType !== 'mouse'` This makes the tests pass, and also makes sure that clicking on the ListboxButton while the Listbox is open doesn't close and auto opens again but stays closed.
Couldn't reproduce this on a physical Android device in Chrome, but could reproduce it via the Chrome Devtools. Made some adjustments by essentially copying the full Re-using the logic was necessary to prevent a bug where clicking the ListboxButton in an open Listbox closed the Listbox and immediately re-opened it. My initial thinking was to use the trim.C7EAA7D7-87E1-4BB6-A522-106C1613A364.MOVRe tests: I'm not sure how realistic it is to introduce these browser tests in this PR. I did manually test on Chrome and Safari (in normal mode, where |
Fixes #3750
@RobinMalfait is this the right approach?